package com.fxp.project.jiuselu.web.models.user.mapper;

import com.fxp.project.jiuselu.web.models.user.entity.JslUserAddress;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户地址表 Mapper 接口
 * </p>
 *
 * @author Jason.Wang
 * @since 2021-11-10
 */
public interface JslUserAddressMapper extends BaseMapper<JslUserAddress> {

    /**
     * selectJslUserAddressByUserId: 获取当前用户的地址列表信息<br/>
     *
     * @param userId
     * @return
     * @author Kai.Wang
     * @date 2021/11/10 13:37
     */
    List<JslUserAddress> selectJslUserAddressListByUserId(Long userId);
    /**
     * selectDefaultJslUserAddressByUserIdWithAddressId: 根据用户的Id获取当前的地址信息<br/>
     *
     * @param userId
     * @return
     * @author Kai.Wang
     * @date 2021/11/10 13:43
     */
    JslUserAddress selectDefaultJslUserAddressByUserIdWithAddressId(Long userId);

    /**
     * selectJslUserAddressByUserIdWithAddressId: 根据当前用户获取指定的地址信息<br/>
     *
     * @param userId
     * @param addressId
     * @return
     * @author Kai.Wang
     * @date 2021/11/10 13:42
     */
    JslUserAddress selectJslUserAddressByUserIdWithAddressId(@Param("userId") Long userId,@Param("addressId")  Long addressId);
}
